package practice_1;

import java.util.Random;
import java.util.Scanner;

public class guessgame {

	public static void main(String[] args) {
		Random  r = new Random();
		int x = r.nextInt(100);
		//System.out.println(x);
		System.err.println("猜一个1~100的数字");
		Scanner sc = new Scanner(System.in);
		
		while(true) {
			int y = sc.nextInt();
			if(y > x ) {
				System.out.println("猜大了");
			}
			else if(y < x) {
				System.out.println("猜小了");
			}
			else {
				System.out.println("猜中了,本次游戏结束！");
				break;
			}
		}
		
	}

}
